Optimal. Leaf size=66 \[ \frac {i d \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i (c+d x)^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3719, 2190, 2279, 2391} \[ \frac {i d \text {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i (c+d x)^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2279
Rule 2391
Rule 3719
Rubi steps
\begin {align*} \int (c+d x) \tan (a+b x) \, dx &=\frac {i (c+d x)^2}{2 d}-2 i \int \frac {e^{2 i (a+b x)} (c+d x)}{1+e^{2 i (a+b x)}} \, dx\\ &=\frac {i (c+d x)^2}{2 d}-\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {d \int \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=\frac {i (c+d x)^2}{2 d}-\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^2}\\ &=\frac {i (c+d x)^2}{2 d}-\frac {(c+d x) \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {i d \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 70, normalized size = 1.06 \[ \frac {i d \text {Li}_2\left (-e^{2 i (a+b x)}\right )}{2 b^2}-\frac {c \log (\cos (a+b x))}{b}-\frac {d x \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac {1}{2} i d x^2 \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.49, size = 310, normalized size = 4.70 \[ \frac {-i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) + i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \sec \left (b x + a\right ) \sin \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.07, size = 123, normalized size = 1.86 \[ \frac {i d \,x^{2}}{2}-i c x -\frac {c \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right )}{b}+\frac {2 c \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {2 i d a x}{b}+\frac {i d \,a^{2}}{b^{2}}-\frac {d \ln \left (1+{\mathrm e}^{2 i \left (b x +a \right )}\right ) x}{b}+\frac {i d \polylog \left (2, -{\mathrm e}^{2 i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {2 d a \ln \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.53, size = 114, normalized size = 1.73 \[ -\frac {-i \, b^{2} d x^{2} - 2 i \, b^{2} c x + {\left (2 i \, b d x + 2 i \, b c\right )} \arctan \left (\sin \left (2 \, b x + 2 \, a\right ), \cos \left (2 \, b x + 2 \, a\right ) + 1\right ) - i \, d {\rm Li}_2\left (-e^{\left (2 i \, b x + 2 i \, a\right )}\right ) + {\left (b d x + b c\right )} \log \left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )}{2 \, b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.57, size = 148, normalized size = 2.24 \[ \frac {c\,\ln \left ({\mathrm {tan}\left (a+b\,x\right )}^2+1\right )}{2\,b}-\frac {d\,\left (\pi \,\ln \left (\cos \left (b\,x\right )\right )+\mathrm {polylog}\left (2,-{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}-\pi \,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )+2\,a\,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )-\pi \,\ln \left ({\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+1\right )+b^2\,x^2\,1{}\mathrm {i}-\ln \left (\cos \left (a+b\,x\right )\right )\,\left (2\,a-\pi \right )+2\,b\,x\,\ln \left ({\mathrm {e}}^{-a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-b\,x\,2{}\mathrm {i}}+1\right )+a\,b\,x\,2{}\mathrm {i}\right )}{2\,b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \sin {\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________